package com.cyzy.controller;

import com.cyzy.dao.StudentClassDao;
import com.cyzy.dto.Result;
import com.cyzy.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/class")
public class ClassController {

    @Autowired
    private ClassService classService;

    @GetMapping("/showClass")
    public Result showClass(StudentClassDao studentClassDao){
        List<StudentClassDao> classList = classService.showClass(studentClassDao);
        return Result.ok().data("classList", classList);
    }



}
